package unit5.collection;

import java.util.LinkedList;

public class Queue_LinkListTest {
    private LinkedList ll=new LinkedList();

    //进队
    public void put(Object o){
        ll.add(o);
    }
    //出队
    public Object remove(){
        return ll.removeFirst();
    }
    //获取队列长度
    public int size(){
        return ll.size();
    }

    public static void main(String[] args) {
        Queue_LinkListTest queue=new Queue_LinkListTest();
        queue.put("张三");
        queue.put("李四");
        queue.put("王五");
        queue.put("赵六");
        System.out.println(queue.size());
        System.out.println(queue.remove());//删除张三
        System.out.println(queue.remove());//删除李四
    }
}
